/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    'ap-northeast-2-pop' = 'hbase.aliyuncs.com',
    'ap-south-1' = 'hbase.aliyuncs.com',
    'ap-southeast-2' = 'hbase.aliyuncs.com',
    'cn-beijing-finance-1' = 'hbase.aliyuncs.com',
    'cn-beijing-finance-pop' = 'hbase.aliyuncs.com',
    'cn-beijing-gov-1' = 'hbase.aliyuncs.com',
    'cn-beijing-nu16-b01' = 'hbase.aliyuncs.com',
    'cn-edge-1' = 'hbase.aliyuncs.com',
    'cn-fujian' = 'hbase.aliyuncs.com',
    'cn-haidian-cm12-c01' = 'hbase.aliyuncs.com',
    'cn-hangzhou-bj-b01' = 'hbase.aliyuncs.com',
    'cn-hangzhou-internal-prod-1' = 'hbase.aliyuncs.com',
    'cn-hangzhou-internal-test-1' = 'hbase.aliyuncs.com',
    'cn-hangzhou-internal-test-2' = 'hbase.aliyuncs.com',
    'cn-hangzhou-internal-test-3' = 'hbase.aliyuncs.com',
    'cn-hangzhou-test-306' = 'hbase.aliyuncs.com',
    'cn-hongkong-finance-pop' = 'hbase.aliyuncs.com',
    'cn-qingdao-nebula' = 'hbase.aliyuncs.com',
    'cn-shanghai-et15-b01' = 'hbase.aliyuncs.com',
    'cn-shanghai-et2-b01' = 'hbase.aliyuncs.com',
    'cn-shanghai-inner' = 'hbase.aliyuncs.com',
    'cn-shanghai-internal-test-1' = 'hbase.aliyuncs.com',
    'cn-shenzhen-inner' = 'hbase.aliyuncs.com',
    'cn-shenzhen-st4-d01' = 'hbase.aliyuncs.com',
    'cn-shenzhen-su18-b01' = 'hbase.aliyuncs.com',
    'cn-wuhan' = 'hbase.aliyuncs.com',
    'cn-wulanchabu' = 'hbase.aliyuncs.com',
    'cn-yushanfang' = 'hbase.aliyuncs.com',
    'cn-zhangbei' = 'hbase.aliyuncs.com',
    'cn-zhangbei-na61-b01' = 'hbase.aliyuncs.com',
    'cn-zhangjiakou-na62-a01' = 'hbase.aliyuncs.com',
    'cn-zhengzhou-nebula-1' = 'hbase.aliyuncs.com',
    'eu-west-1-oxs' = 'hbase.aliyuncs.com',
    'rus-west-1-pop' = 'hbase.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('hbase', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddUserHdfsInfoRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  extInfo?: string(name='ExtInfo', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model AddUserHdfsInfoResponseBody = {
  clusterId?: string(name='ClusterId'),
  requestId?: string(name='RequestId'),
}

model AddUserHdfsInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddUserHdfsInfoResponseBody(name='body'),
}

/**
 * @param request AddUserHdfsInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddUserHdfsInfoResponse
 */
async function addUserHdfsInfoWithOptions(request: AddUserHdfsInfoRequest, runtime: Util.RuntimeOptions): AddUserHdfsInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.extInfo)) {
    query['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddUserHdfsInfo',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request AddUserHdfsInfoRequest
 * @return AddUserHdfsInfoResponse
 */
async function addUserHdfsInfo(request: AddUserHdfsInfoRequest): AddUserHdfsInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return addUserHdfsInfoWithOptions(request, runtime);
}

model AllocatePublicNetworkAddressRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model AllocatePublicNetworkAddressResponseBody = {
  requestId?: string(name='RequestId'),
}

model AllocatePublicNetworkAddressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AllocatePublicNetworkAddressResponseBody(name='body'),
}

/**
 * @param request AllocatePublicNetworkAddressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AllocatePublicNetworkAddressResponse
 */
async function allocatePublicNetworkAddressWithOptions(request: AllocatePublicNetworkAddressRequest, runtime: Util.RuntimeOptions): AllocatePublicNetworkAddressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AllocatePublicNetworkAddress',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request AllocatePublicNetworkAddressRequest
 * @return AllocatePublicNetworkAddressResponse
 */
async function allocatePublicNetworkAddress(request: AllocatePublicNetworkAddressRequest): AllocatePublicNetworkAddressResponse {
  var runtime = new Util.RuntimeOptions{};
  return allocatePublicNetworkAddressWithOptions(request, runtime);
}

model CheckVersionsOfComponentsRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  components?: string(name='Components', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model CheckVersionsOfComponentsResponseBody = {
  components?: {
    components?: [ 
    {
      component?: string(name='Component'),
      isLatestVersion?: string(name='IsLatestVersion'),
    }
  ](name='Components')
  }(name='Components'),
  requestId?: string(name='RequestId'),
}

model CheckVersionsOfComponentsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckVersionsOfComponentsResponseBody(name='body'),
}

/**
 * @param request CheckVersionsOfComponentsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckVersionsOfComponentsResponse
 */
async function checkVersionsOfComponentsWithOptions(request: CheckVersionsOfComponentsRequest, runtime: Util.RuntimeOptions): CheckVersionsOfComponentsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.components)) {
    query['Components'] = request.components;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckVersionsOfComponents',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CheckVersionsOfComponentsRequest
 * @return CheckVersionsOfComponentsResponse
 */
async function checkVersionsOfComponents(request: CheckVersionsOfComponentsRequest): CheckVersionsOfComponentsResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkVersionsOfComponentsWithOptions(request, runtime);
}

model CloseBackupRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model CloseBackupResponseBody = {
  requestId?: string(name='RequestId'),
}

model CloseBackupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CloseBackupResponseBody(name='body'),
}

/**
 * @param request CloseBackupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CloseBackupResponse
 */
async function closeBackupWithOptions(request: CloseBackupRequest, runtime: Util.RuntimeOptions): CloseBackupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CloseBackup',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CloseBackupRequest
 * @return CloseBackupResponse
 */
async function closeBackup(request: CloseBackupRequest): CloseBackupResponse {
  var runtime = new Util.RuntimeOptions{};
  return closeBackupWithOptions(request, runtime);
}

model ConvertClusterRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  duration?: int32(name='Duration', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  pricingCycle?: string(name='PricingCycle', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ConvertClusterResponseBody = {
  orderId?: long(name='OrderId'),
  requestId?: string(name='RequestId'),
}

model ConvertClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ConvertClusterResponseBody(name='body'),
}

/**
 * @param request ConvertClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ConvertClusterResponse
 */
async function convertClusterWithOptions(request: ConvertClusterRequest, runtime: Util.RuntimeOptions): ConvertClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.duration)) {
    query['Duration'] = request.duration;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pricingCycle)) {
    query['PricingCycle'] = request.pricingCycle;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ConvertCluster',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ConvertClusterRequest
 * @return ConvertClusterResponse
 */
async function convertCluster(request: ConvertClusterRequest): ConvertClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return convertClusterWithOptions(request, runtime);
}

model CreateClusterRequest {
  autoRenew?: string(name='AutoRenew'),
  backupId?: string(name='BackupId'),
  clientToken?: string(name='ClientToken'),
  cloudType?: string(name='CloudType', description='This parameter is required.'),
  clusterName?: string(name='ClusterName', description='This parameter is required.'),
  coldStorageSize?: string(name='ColdStorageSize'),
  coreDiskQuantity?: string(name='CoreDiskQuantity', description='This parameter is required.'),
  coreDiskSize?: string(name='CoreDiskSize', description='This parameter is required.'),
  coreDiskType?: string(name='CoreDiskType', description='This parameter is required.'),
  coreInstanceQuantity?: string(name='CoreInstanceQuantity', description='This parameter is required.'),
  coreInstanceType?: string(name='CoreInstanceType', description='This parameter is required.'),
  dbInstanceConnType?: string(name='DbInstanceConnType'),
  dbInstanceType?: string(name='DbInstanceType'),
  dbType?: string(name='DbType'),
  depMode?: string(name='DepMode'),
  duration?: string(name='Duration'),
  engine?: string(name='Engine', description='This parameter is required.'),
  engineVersion?: string(name='EngineVersion', description='This parameter is required.'),
  isColdStorage?: string(name='IsColdStorage'),
  masterInstanceType?: string(name='MasterInstanceType', description='This parameter is required.'),
  netType?: string(name='NetType', description='This parameter is required.'),
  payType?: string(name='PayType'),
  pricingCycle?: string(name='PricingCycle'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  restoreTime?: string(name='RestoreTime'),
  securityIPList?: string(name='SecurityIPList', description='This parameter is required.'),
  srcDBInstanceId?: string(name='SrcDBInstanceId'),
  vSwitchId?: string(name='VSwitchId'),
  vpcId?: string(name='VpcId'),
  zoneId?: string(name='ZoneId', description='This parameter is required.'),
}

model CreateClusterResponseBody = {
  clusterId?: string(name='ClusterId'),
  orderId?: string(name='OrderId'),
  requestId?: string(name='RequestId'),
}

model CreateClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateClusterResponseBody(name='body'),
}

/**
 * @summary 创建实例
 *
 * @param request CreateClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateClusterResponse
 */
async function createClusterWithOptions(request: CreateClusterRequest, runtime: Util.RuntimeOptions): CreateClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.autoRenew)) {
    query['AutoRenew'] = request.autoRenew;
  }
  if (!Util.isUnset(request.backupId)) {
    query['BackupId'] = request.backupId;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.cloudType)) {
    query['CloudType'] = request.cloudType;
  }
  if (!Util.isUnset(request.clusterName)) {
    query['ClusterName'] = request.clusterName;
  }
  if (!Util.isUnset(request.coldStorageSize)) {
    query['ColdStorageSize'] = request.coldStorageSize;
  }
  if (!Util.isUnset(request.coreDiskQuantity)) {
    query['CoreDiskQuantity'] = request.coreDiskQuantity;
  }
  if (!Util.isUnset(request.coreDiskSize)) {
    query['CoreDiskSize'] = request.coreDiskSize;
  }
  if (!Util.isUnset(request.coreDiskType)) {
    query['CoreDiskType'] = request.coreDiskType;
  }
  if (!Util.isUnset(request.coreInstanceQuantity)) {
    query['CoreInstanceQuantity'] = request.coreInstanceQuantity;
  }
  if (!Util.isUnset(request.coreInstanceType)) {
    query['CoreInstanceType'] = request.coreInstanceType;
  }
  if (!Util.isUnset(request.dbInstanceConnType)) {
    query['DbInstanceConnType'] = request.dbInstanceConnType;
  }
  if (!Util.isUnset(request.dbInstanceType)) {
    query['DbInstanceType'] = request.dbInstanceType;
  }
  if (!Util.isUnset(request.dbType)) {
    query['DbType'] = request.dbType;
  }
  if (!Util.isUnset(request.depMode)) {
    query['DepMode'] = request.depMode;
  }
  if (!Util.isUnset(request.duration)) {
    query['Duration'] = request.duration;
  }
  if (!Util.isUnset(request.engine)) {
    query['Engine'] = request.engine;
  }
  if (!Util.isUnset(request.engineVersion)) {
    query['EngineVersion'] = request.engineVersion;
  }
  if (!Util.isUnset(request.isColdStorage)) {
    query['IsColdStorage'] = request.isColdStorage;
  }
  if (!Util.isUnset(request.masterInstanceType)) {
    query['MasterInstanceType'] = request.masterInstanceType;
  }
  if (!Util.isUnset(request.netType)) {
    query['NetType'] = request.netType;
  }
  if (!Util.isUnset(request.payType)) {
    query['PayType'] = request.payType;
  }
  if (!Util.isUnset(request.pricingCycle)) {
    query['PricingCycle'] = request.pricingCycle;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.restoreTime)) {
    query['RestoreTime'] = request.restoreTime;
  }
  if (!Util.isUnset(request.securityIPList)) {
    query['SecurityIPList'] = request.securityIPList;
  }
  if (!Util.isUnset(request.srcDBInstanceId)) {
    query['SrcDBInstanceId'] = request.srcDBInstanceId;
  }
  if (!Util.isUnset(request.vSwitchId)) {
    query['VSwitchId'] = request.vSwitchId;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateCluster',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 创建实例
 *
 * @param request CreateClusterRequest
 * @return CreateClusterResponse
 */
async function createCluster(request: CreateClusterRequest): CreateClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return createClusterWithOptions(request, runtime);
}

model CreateGlobalResourceRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceName?: string(name='ResourceName', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType', description='This parameter is required.'),
  zoneId?: string(name='ZoneId'),
}

model CreateGlobalResourceResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateGlobalResourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateGlobalResourceResponseBody(name='body'),
}

/**
 * @param request CreateGlobalResourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateGlobalResourceResponse
 */
async function createGlobalResourceWithOptions(request: CreateGlobalResourceRequest, runtime: Util.RuntimeOptions): CreateGlobalResourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceName)) {
    query['ResourceName'] = request.resourceName;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateGlobalResource',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CreateGlobalResourceRequest
 * @return CreateGlobalResourceResponse
 */
async function createGlobalResource(request: CreateGlobalResourceRequest): CreateGlobalResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createGlobalResourceWithOptions(request, runtime);
}

model CreateHbaseSlbServerRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  slbServer?: string(name='SlbServer', description='This parameter is required.'),
  zoneId?: string(name='ZoneId'),
}

model CreateHbaseSlbServerResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateHbaseSlbServerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateHbaseSlbServerResponseBody(name='body'),
}

/**
 * @param request CreateHbaseSlbServerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateHbaseSlbServerResponse
 */
async function createHbaseSlbServerWithOptions(request: CreateHbaseSlbServerRequest, runtime: Util.RuntimeOptions): CreateHbaseSlbServerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.slbServer)) {
    query['SlbServer'] = request.slbServer;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateHbaseSlbServer',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CreateHbaseSlbServerRequest
 * @return CreateHbaseSlbServerResponse
 */
async function createHbaseSlbServer(request: CreateHbaseSlbServerRequest): CreateHbaseSlbServerResponse {
  var runtime = new Util.RuntimeOptions{};
  return createHbaseSlbServerWithOptions(request, runtime);
}

model CreateSubscriptionRequest {
  destinationInstanceId?: string(name='DestinationInstanceId', description='This parameter is required.'),
  destinationInstanceRegionId?: string(name='DestinationInstanceRegionId', description='This parameter is required.'),
  extraContext?: string(name='ExtraContext'),
  mapping?: string(name='Mapping', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  slbServer?: string(name='SlbServer'),
  sourceInstanceId?: string(name='SourceInstanceId', description='This parameter is required.'),
  sourceInstanceRegionId?: string(name='SourceInstanceRegionId', description='This parameter is required.'),
  subscriptionDescription?: string(name='SubscriptionDescription'),
  subscriptionType?: string(name='SubscriptionType', description='This parameter is required.'),
  zoneId?: string(name='ZoneId'),
}

model CreateSubscriptionResponseBody = {
  requestId?: string(name='RequestId'),
  subscriptionId?: string(name='SubscriptionId'),
}

model CreateSubscriptionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateSubscriptionResponseBody(name='body'),
}

/**
 * @summary 创建订阅
 *
 * @param request CreateSubscriptionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateSubscriptionResponse
 */
async function createSubscriptionWithOptions(request: CreateSubscriptionRequest, runtime: Util.RuntimeOptions): CreateSubscriptionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.destinationInstanceId)) {
    query['DestinationInstanceId'] = request.destinationInstanceId;
  }
  if (!Util.isUnset(request.destinationInstanceRegionId)) {
    query['DestinationInstanceRegionId'] = request.destinationInstanceRegionId;
  }
  if (!Util.isUnset(request.extraContext)) {
    query['ExtraContext'] = request.extraContext;
  }
  if (!Util.isUnset(request.mapping)) {
    query['Mapping'] = request.mapping;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.slbServer)) {
    query['SlbServer'] = request.slbServer;
  }
  if (!Util.isUnset(request.sourceInstanceId)) {
    query['SourceInstanceId'] = request.sourceInstanceId;
  }
  if (!Util.isUnset(request.sourceInstanceRegionId)) {
    query['SourceInstanceRegionId'] = request.sourceInstanceRegionId;
  }
  if (!Util.isUnset(request.subscriptionDescription)) {
    query['SubscriptionDescription'] = request.subscriptionDescription;
  }
  if (!Util.isUnset(request.subscriptionType)) {
    query['SubscriptionType'] = request.subscriptionType;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateSubscription',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 创建订阅
 *
 * @param request CreateSubscriptionRequest
 * @return CreateSubscriptionResponse
 */
async function createSubscription(request: CreateSubscriptionRequest): CreateSubscriptionResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSubscriptionWithOptions(request, runtime);
}

model DeleteClusterRequest {
  clientToken?: string(name='ClientToken'),
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model DeleteClusterResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteClusterResponseBody(name='body'),
}

/**
 * @param request DeleteClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteClusterResponse
 */
async function deleteClusterWithOptions(request: DeleteClusterRequest, runtime: Util.RuntimeOptions): DeleteClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCluster',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteClusterRequest
 * @return DeleteClusterResponse
 */
async function deleteCluster(request: DeleteClusterRequest): DeleteClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteClusterWithOptions(request, runtime);
}

model DeleteGlobalResourceRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceName?: string(name='ResourceName', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType', description='This parameter is required.'),
  zoneId?: string(name='ZoneId'),
}

model DeleteGlobalResourceResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteGlobalResourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteGlobalResourceResponseBody(name='body'),
}

/**
 * @param request DeleteGlobalResourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteGlobalResourceResponse
 */
async function deleteGlobalResourceWithOptions(request: DeleteGlobalResourceRequest, runtime: Util.RuntimeOptions): DeleteGlobalResourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceName)) {
    query['ResourceName'] = request.resourceName;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteGlobalResource',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteGlobalResourceRequest
 * @return DeleteGlobalResourceResponse
 */
async function deleteGlobalResource(request: DeleteGlobalResourceRequest): DeleteGlobalResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteGlobalResourceWithOptions(request, runtime);
}

model DeleteHbaseSlbServerRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  slbServer?: string(name='SlbServer', description='This parameter is required.'),
  zoneId?: string(name='ZoneId'),
}

model DeleteHbaseSlbServerResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteHbaseSlbServerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteHbaseSlbServerResponseBody(name='body'),
}

/**
 * @param request DeleteHbaseSlbServerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteHbaseSlbServerResponse
 */
async function deleteHbaseSlbServerWithOptions(request: DeleteHbaseSlbServerRequest, runtime: Util.RuntimeOptions): DeleteHbaseSlbServerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.slbServer)) {
    query['SlbServer'] = request.slbServer;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteHbaseSlbServer',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteHbaseSlbServerRequest
 * @return DeleteHbaseSlbServerResponse
 */
async function deleteHbaseSlbServer(request: DeleteHbaseSlbServerRequest): DeleteHbaseSlbServerResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteHbaseSlbServerWithOptions(request, runtime);
}

model DeleteServerlessInstanceRequest {
  clientToken?: string(name='ClientToken'),
  instanceId?: string(name='InstanceId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId', description='This parameter is required.'),
}

model DeleteServerlessInstanceResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteServerlessInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteServerlessInstanceResponseBody(name='body'),
}

/**
 * @param request DeleteServerlessInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteServerlessInstanceResponse
 */
async function deleteServerlessInstanceWithOptions(request: DeleteServerlessInstanceRequest, runtime: Util.RuntimeOptions): DeleteServerlessInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteServerlessInstance',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteServerlessInstanceRequest
 * @return DeleteServerlessInstanceResponse
 */
async function deleteServerlessInstance(request: DeleteServerlessInstanceRequest): DeleteServerlessInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteServerlessInstanceWithOptions(request, runtime);
}

model DeleteUserHdfsInfoRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  nameService?: string(name='NameService', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model DeleteUserHdfsInfoResponseBody = {
  clusterId?: string(name='ClusterId'),
  requestId?: string(name='RequestId'),
}

model DeleteUserHdfsInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUserHdfsInfoResponseBody(name='body'),
}

/**
 * @param request DeleteUserHdfsInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteUserHdfsInfoResponse
 */
async function deleteUserHdfsInfoWithOptions(request: DeleteUserHdfsInfoRequest, runtime: Util.RuntimeOptions): DeleteUserHdfsInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.nameService)) {
    query['NameService'] = request.nameService;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUserHdfsInfo',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteUserHdfsInfoRequest
 * @return DeleteUserHdfsInfoResponse
 */
async function deleteUserHdfsInfo(request: DeleteUserHdfsInfoRequest): DeleteUserHdfsInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserHdfsInfoWithOptions(request, runtime);
}

model DescribeBackupPolicyRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model DescribeBackupPolicyResponseBody = {
  backupRetentionPeriod?: string(name='BackupRetentionPeriod'),
  preferredBackupEndTimeUTC?: string(name='PreferredBackupEndTimeUTC'),
  preferredBackupPeriod?: string(name='PreferredBackupPeriod'),
  preferredBackupStartTimeUTC?: string(name='PreferredBackupStartTimeUTC'),
  preferredBackupTime?: string(name='PreferredBackupTime'),
  requestId?: string(name='RequestId'),
}

model DescribeBackupPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeBackupPolicyResponseBody(name='body'),
}

/**
 * @param request DescribeBackupPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeBackupPolicyResponse
 */
async function describeBackupPolicyWithOptions(request: DescribeBackupPolicyRequest, runtime: Util.RuntimeOptions): DescribeBackupPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBackupPolicy',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeBackupPolicyRequest
 * @return DescribeBackupPolicyResponse
 */
async function describeBackupPolicy(request: DescribeBackupPolicyRequest): DescribeBackupPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBackupPolicyWithOptions(request, runtime);
}

model DescribeBackupsRequest {
  backupId?: int32(name='BackupId'),
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  endTime?: string(name='EndTime'),
  endTimeUTC?: string(name='EndTimeUTC'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  startTime?: string(name='StartTime'),
  startTimeUTC?: string(name='StartTimeUTC'),
  zoneId?: string(name='ZoneId'),
}

model DescribeBackupsResponseBody = {
  backups?: {
    backup?: [ 
    {
      backupDBNames?: string(name='BackupDBNames'),
      backupDownloadURL?: string(name='BackupDownloadURL'),
      backupEndTime?: string(name='BackupEndTime'),
      backupEndTimeUTC?: string(name='BackupEndTimeUTC'),
      backupId?: int32(name='BackupId'),
      backupMethod?: string(name='BackupMethod'),
      backupMode?: string(name='BackupMode'),
      backupSize?: string(name='BackupSize'),
      backupStartTime?: string(name='BackupStartTime'),
      backupStartTimeUTC?: string(name='BackupStartTimeUTC'),
      backupStatus?: string(name='BackupStatus'),
      backupType?: string(name='BackupType'),
    }
  ](name='Backup')
  }(name='Backups'),
  enableStatus?: string(name='EnableStatus'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model DescribeBackupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeBackupsResponseBody(name='body'),
}

/**
 * @param request DescribeBackupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeBackupsResponse
 */
async function describeBackupsWithOptions(request: DescribeBackupsRequest, runtime: Util.RuntimeOptions): DescribeBackupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backupId)) {
    query['BackupId'] = request.backupId;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.endTimeUTC)) {
    query['EndTimeUTC'] = request.endTimeUTC;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.startTimeUTC)) {
    query['StartTimeUTC'] = request.startTimeUTC;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBackups',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeBackupsRequest
 * @return DescribeBackupsResponse
 */
async function describeBackups(request: DescribeBackupsRequest): DescribeBackupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBackupsWithOptions(request, runtime);
}

model DescribeClusterAttributeRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model DescribeClusterAttributeResponseBody = {
  autoRenew?: string(name='AutoRenew'),
  clusterId?: string(name='ClusterId'),
  clusterName?: string(name='ClusterName'),
  clusterType?: string(name='ClusterType'),
  coldStorageStatus?: string(name='ColdStorageStatus'),
  connectionInfo?: {
    haRestConnectionString?: string(name='HaRestConnectionString'),
    haRestPort?: string(name='HaRestPort'),
    haThriftConnectionString?: string(name='HaThriftConnectionString'),
    haThriftPort?: string(name='HaThriftPort'),
    thriftConnectionString?: string(name='ThriftConnectionString'),
    thriftPort?: string(name='ThriftPort'),
    UIProxyConnectionString?: string(name='UIProxyConnectionString'),
    ZKClassicConnectionStringList?: {
      string?: [ string ](name='String')
    }(name='ZKClassicConnectionStringList'),
    ZKConnectionStringList?: {
      string?: [ string ](name='String')
    }(name='ZKConnectionStringList'),
    ZKInnerConnectionStringList?: {
      string?: [ string ](name='String')
    }(name='ZKInnerConnectionStringList'),
    ZKPort?: int32(name='ZKPort'),
    ZKPublicConnectionStringList?: {
      string?: [ string ](name='String')
    }(name='ZKPublicConnectionStringList'),
  }(name='ConnectionInfo'),
  coreDiskQuantity?: int32(name='CoreDiskQuantity'),
  coreDiskSize?: string(name='CoreDiskSize'),
  coreDiskType?: string(name='CoreDiskType'),
  coreInstanceQuantity?: int32(name='CoreInstanceQuantity'),
  coreInstanceType?: string(name='CoreInstanceType'),
  createTime?: string(name='CreateTime'),
  expireTime?: string(name='ExpireTime'),
  haType?: string(name='HaType'),
  hasUser?: string(name='HasUser'),
  lockMode?: string(name='LockMode'),
  mainVersion?: string(name='MainVersion'),
  masterDiskSize?: int32(name='MasterDiskSize'),
  masterDiskType?: string(name='MasterDiskType'),
  masterInstanceType?: string(name='MasterInstanceType'),
  minorVersion?: string(name='MinorVersion'),
  netInfo?: {
    innerIpAddress?: string(name='InnerIpAddress'),
    netType?: string(name='NetType'),
    publicIpAddress?: string(name='PublicIpAddress'),
    securityIpList?: string(name='SecurityIpList'),
    vSwitchId?: string(name='VSwitchId'),
    vpcId?: string(name='VpcId'),
  }(name='NetInfo'),
  nodeList?: {
    node?: [ 
    {
      daemonList?: {
        daemon?: [ 
        {
          daemonName?: string(name='DaemonName'),
          daemonStatus?: string(name='DaemonStatus'),
        }
      ](name='Daemon')
      }(name='DaemonList'),
      memStore?: string(name='MemStore'),
      nodeDiskQuantity?: string(name='NodeDiskQuantity'),
      nodeDiskSize?: string(name='NodeDiskSize'),
      nodeDiskType?: string(name='NodeDiskType'),
      nodeId?: string(name='NodeId'),
      nodeInstanceType?: string(name='NodeInstanceType'),
      nodeStatus?: string(name='NodeStatus'),
      nodeType?: string(name='NodeType'),
      regionQuantity?: string(name='RegionQuantity'),
      serviceType?: string(name='ServiceType'),
      storeFile?: string(name='StoreFile'),
    }
  ](name='Node')
  }(name='NodeList'),
  payType?: string(name='PayType'),
  regionId?: string(name='RegionId'),
  requestId?: string(name='RequestId'),
  status?: string(name='Status'),
  updateStatus?: string(name='UpdateStatus'),
  zoneId?: string(name='ZoneId'),
}

model DescribeClusterAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterAttributeResponseBody(name='body'),
}

/**
 * @param request DescribeClusterAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterAttributeResponse
 */
async function describeClusterAttributeWithOptions(request: DescribeClusterAttributeRequest, runtime: Util.RuntimeOptions): DescribeClusterAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterAttribute',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeClusterAttributeRequest
 * @return DescribeClusterAttributeResponse
 */
async function describeClusterAttribute(request: DescribeClusterAttributeRequest): DescribeClusterAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterAttributeWithOptions(request, runtime);
}

model DescribeClusterConnectAddrsRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model DescribeClusterConnectAddrsResponseBody = {
  dbType?: string(name='DbType'),
  isMultimod?: string(name='IsMultimod'),
  netType?: string(name='NetType'),
  requestId?: string(name='RequestId'),
  serviceConnAddrs?: {
    serviceConnAddr?: [ 
    {
      connAddrInfo?: {
        connAddr?: string(name='ConnAddr'),
        connAddrPort?: string(name='ConnAddrPort'),
        netType?: string(name='NetType'),
      }(name='ConnAddrInfo'),
      connType?: string(name='ConnType'),
    }
  ](name='ServiceConnAddr')
  }(name='ServiceConnAddrs'),
  slbConnAddrs?: {
    slbConnAddr?: [ 
    {
      connAddrInfo?: {
        connAddr?: string(name='ConnAddr'),
        connAddrPort?: string(name='ConnAddrPort'),
        netType?: string(name='NetType'),
      }(name='ConnAddrInfo'),
      slbType?: string(name='SlbType'),
    }
  ](name='SlbConnAddr')
  }(name='SlbConnAddrs'),
  thriftConn?: {
    connAddr?: string(name='ConnAddr'),
    connAddrPort?: string(name='ConnAddrPort'),
    netType?: string(name='NetType'),
  }(name='ThriftConn'),
  uiProxyConnAddrInfo?: {
    connAddr?: string(name='ConnAddr'),
    connAddrPort?: string(name='ConnAddrPort'),
    netType?: string(name='NetType'),
  }(name='UiProxyConnAddrInfo'),
  vSwitchId?: string(name='VSwitchId'),
  vpcId?: string(name='VpcId'),
  zkConnAddrs?: {
    zkConnAddr?: [ 
    {
      connAddr?: string(name='ConnAddr'),
      connAddrPort?: string(name='ConnAddrPort'),
      netType?: string(name='NetType'),
    }
  ](name='ZkConnAddr')
  }(name='ZkConnAddrs'),
}

model DescribeClusterConnectAddrsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterConnectAddrsResponseBody(name='body'),
}

/**
 * @param request DescribeClusterConnectAddrsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterConnectAddrsResponse
 */
async function describeClusterConnectAddrsWithOptions(request: DescribeClusterConnectAddrsRequest, runtime: Util.RuntimeOptions): DescribeClusterConnectAddrsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterConnectAddrs',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeClusterConnectAddrsRequest
 * @return DescribeClusterConnectAddrsResponse
 */
async function describeClusterConnectAddrs(request: DescribeClusterConnectAddrsRequest): DescribeClusterConnectAddrsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterConnectAddrsWithOptions(request, runtime);
}

model DescribeClusterListRequest {
  clusterId?: string(name='ClusterId'),
  clusterName?: string(name='ClusterName'),
  dbType?: string(name='DbType'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  statusList?: [ string ](name='StatusList'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
  zoneId?: string(name='ZoneId'),
}

model DescribeClusterListResponseBody = {
  clusterList?: {
    cluster?: [ 
    {
      clusterId?: string(name='ClusterId'),
      clusterName?: string(name='ClusterName'),
      clusterType?: string(name='ClusterType'),
      coreDiskSize?: string(name='CoreDiskSize'),
      coreDiskType?: string(name='CoreDiskType'),
      coreInstanceQuantity?: int32(name='CoreInstanceQuantity'),
      createTime?: string(name='CreateTime'),
      dbType?: string(name='DbType'),
      expireTime?: string(name='ExpireTime'),
      lockMode?: string(name='LockMode'),
      mainVersion?: string(name='MainVersion'),
      netType?: string(name='NetType'),
      payType?: string(name='PayType'),
      reason?: string(name='Reason'),
      regionId?: string(name='RegionId'),
      status?: string(name='Status'),
      tags?: {
        tag?: [ 
        {
          key?: string(name='Key'),
          value?: string(name='Value'),
        }
      ](name='Tag')
      }(name='Tags'),
      userId?: string(name='UserId'),
      vpcId?: string(name='VpcId'),
      zoneId?: string(name='ZoneId'),
    }
  ](name='Cluster')
  }(name='ClusterList'),
  pageNumber?: int32(name='PageNumber'),
  pageRecordCount?: int32(name='PageRecordCount'),
  requestId?: string(name='RequestId'),
  totalRecordCount?: int32(name='TotalRecordCount'),
}

model DescribeClusterListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterListResponseBody(name='body'),
}

/**
 * @param request DescribeClusterListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterListResponse
 */
async function describeClusterListWithOptions(request: DescribeClusterListRequest, runtime: Util.RuntimeOptions): DescribeClusterListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.clusterName)) {
    query['ClusterName'] = request.clusterName;
  }
  if (!Util.isUnset(request.dbType)) {
    query['DbType'] = request.dbType;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.statusList)) {
    query['StatusList'] = request.statusList;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterList',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeClusterListRequest
 * @return DescribeClusterListResponse
 */
async function describeClusterList(request: DescribeClusterListRequest): DescribeClusterListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterListWithOptions(request, runtime);
}

model DescribeClusterModelRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model DescribeClusterModelResponseBody = {
  autoRenew?: string(name='AutoRenew'),
  backupStatus?: string(name='BackupStatus'),
  clusterId?: string(name='ClusterId'),
  clusterName?: string(name='ClusterName'),
  clusterType?: string(name='ClusterType'),
  coldStorageStatus?: string(name='ColdStorageStatus'),
  coreDiskQuantity?: int32(name='CoreDiskQuantity'),
  coreDiskSize?: string(name='CoreDiskSize'),
  coreDiskType?: string(name='CoreDiskType'),
  coreInstanceQuantity?: int32(name='CoreInstanceQuantity'),
  coreInstanceType?: string(name='CoreInstanceType'),
  createTime?: string(name='CreateTime'),
  dbType?: string(name='DbType'),
  expireTime?: string(name='ExpireTime'),
  haType?: string(name='HaType'),
  hasUser?: string(name='HasUser'),
  isMultimod?: string(name='IsMultimod'),
  lockMode?: string(name='LockMode'),
  mainVersion?: string(name='MainVersion'),
  masterDiskSize?: int32(name='MasterDiskSize'),
  masterDiskType?: string(name='MasterDiskType'),
  masterInstanceType?: string(name='MasterInstanceType'),
  minorVersion?: string(name='MinorVersion'),
  payType?: string(name='PayType'),
  regionId?: string(name='RegionId'),
  requestId?: string(name='RequestId'),
  status?: string(name='Status'),
  tags?: {
    tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag')
  }(name='Tags'),
  updateStatus?: string(name='UpdateStatus'),
  zoneId?: string(name='ZoneId'),
}

model DescribeClusterModelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterModelResponseBody(name='body'),
}

/**
 * @param request DescribeClusterModelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterModelResponse
 */
async function describeClusterModelWithOptions(request: DescribeClusterModelRequest, runtime: Util.RuntimeOptions): DescribeClusterModelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterModel',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeClusterModelRequest
 * @return DescribeClusterModelResponse
 */
async function describeClusterModel(request: DescribeClusterModelRequest): DescribeClusterModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterModelWithOptions(request, runtime);
}

model DescribeClusterWhiteListRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model DescribeClusterWhiteListResponseBody = {
  groupItems?: {
    whiteIp?: [ string ](name='WhiteIp')
  }(name='GroupItems'),
  requestId?: string(name='RequestId'),
}

model DescribeClusterWhiteListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterWhiteListResponseBody(name='body'),
}

/**
 * @param request DescribeClusterWhiteListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterWhiteListResponse
 */
async function describeClusterWhiteListWithOptions(request: DescribeClusterWhiteListRequest, runtime: Util.RuntimeOptions): DescribeClusterWhiteListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterWhiteList',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeClusterWhiteListRequest
 * @return DescribeClusterWhiteListResponse
 */
async function describeClusterWhiteList(request: DescribeClusterWhiteListRequest): DescribeClusterWhiteListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterWhiteListWithOptions(request, runtime);
}

model DescribeColdStorageRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model DescribeColdStorageResponseBody = {
  clusterId?: string(name='ClusterId'),
  coldStorageSize?: string(name='ColdStorageSize'),
  coldStorageUsePercent?: string(name='ColdStorageUsePercent'),
  openStatus?: string(name='OpenStatus'),
  payType?: string(name='PayType'),
  requestId?: string(name='RequestId'),
}

model DescribeColdStorageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeColdStorageResponseBody(name='body'),
}

/**
 * @param request DescribeColdStorageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeColdStorageResponse
 */
async function describeColdStorageWithOptions(request: DescribeColdStorageRequest, runtime: Util.RuntimeOptions): DescribeColdStorageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeColdStorage',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeColdStorageRequest
 * @return DescribeColdStorageResponse
 */
async function describeColdStorage(request: DescribeColdStorageRequest): DescribeColdStorageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeColdStorageWithOptions(request, runtime);
}

model DescribeMultiModDbAttributeRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model DescribeMultiModDbAttributeResponseBody = {
  data?: string(name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeMultiModDbAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMultiModDbAttributeResponseBody(name='body'),
}

/**
 * @param request DescribeMultiModDbAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeMultiModDbAttributeResponse
 */
async function describeMultiModDbAttributeWithOptions(request: DescribeMultiModDbAttributeRequest, runtime: Util.RuntimeOptions): DescribeMultiModDbAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMultiModDbAttribute',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeMultiModDbAttributeRequest
 * @return DescribeMultiModDbAttributeResponse
 */
async function describeMultiModDbAttribute(request: DescribeMultiModDbAttributeRequest): DescribeMultiModDbAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMultiModDbAttributeWithOptions(request, runtime);
}

model DescribeRdsVSwitchsRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  vpcId?: string(name='VpcId'),
  zoneId?: string(name='ZoneId'),
}

model DescribeRdsVSwitchsResponseBody = {
  requestId?: string(name='RequestId'),
  vSwitches?: {
    vSwitch?: [ 
      {
        aliUid?: string(name='AliUid'),
        bid?: string(name='Bid'),
        cidrBlock?: string(name='CidrBlock'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        isDefault?: boolean(name='IsDefault'),
        izNo?: string(name='IzNo'),
        regionNo?: string(name='RegionNo'),
        status?: string(name='Status'),
        vSwitchId?: string(name='VSwitchId'),
        vSwitchName?: string(name='VSwitchName'),
      }
    ](name='VSwitch'),
  }(name='VSwitches'),
}

model DescribeRdsVSwitchsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRdsVSwitchsResponseBody(name='body'),
}

/**
 * @param request DescribeRdsVSwitchsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRdsVSwitchsResponse
 */
async function describeRdsVSwitchsWithOptions(request: DescribeRdsVSwitchsRequest, runtime: Util.RuntimeOptions): DescribeRdsVSwitchsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRdsVSwitchs',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeRdsVSwitchsRequest
 * @return DescribeRdsVSwitchsResponse
 */
async function describeRdsVSwitchs(request: DescribeRdsVSwitchsRequest): DescribeRdsVSwitchsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRdsVSwitchsWithOptions(request, runtime);
}

model DescribeRegionsRequest {
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model DescribeRegionsResponseBody = {
  regions?: {
    region?: [ 
    {
      regionId?: string(name='RegionId'),
      zones?: {
        zone?: [ 
        {
          vpcEnabled?: boolean(name='VpcEnabled'),
          zoneId?: string(name='ZoneId'),
        }
      ](name='Zone')
      }(name='Zones'),
    }
  ](name='Region')
  }(name='Regions'),
  requestId?: string(name='RequestId'),
}

model DescribeRegionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRegionsResponseBody(name='body'),
}

/**
 * @param request DescribeRegionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRegionsResponse
 */
async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRegions',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeRegionsRequest
 * @return DescribeRegionsResponse
 */
async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRegionsWithOptions(request, runtime);
}

model DescribeServerlessInstanceRequest {
  clientToken?: string(name='ClientToken'),
  instanceId?: string(name='InstanceId', description='This parameter is required.'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  zoneId?: string(name='ZoneId', description='This parameter is required.'),
}

model DescribeServerlessInstanceResponseBody = {
  autoRenew?: string(name='AutoRenew'),
  clusterType?: string(name='ClusterType'),
  createTime?: string(name='CreateTime'),
  cuSize?: string(name='CuSize'),
  diskSize?: string(name='DiskSize'),
  expireTime?: string(name='ExpireTime'),
  haType?: string(name='HaType'),
  hasUser?: string(name='HasUser'),
  innerEndpoint?: string(name='InnerEndpoint'),
  instanceId?: string(name='InstanceId'),
  instanceName?: string(name='InstanceName'),
  isDeletionProtection?: string(name='IsDeletionProtection'),
  lockMode?: string(name='LockMode'),
  mainVersion?: string(name='MainVersion'),
  outerEndpoint?: string(name='OuterEndpoint'),
  payType?: string(name='PayType'),
  regionId?: string(name='RegionId'),
  requestId?: string(name='RequestId'),
  reserverMaxQpsNum?: string(name='ReserverMaxQpsNum'),
  reserverMinQpsNum?: string(name='ReserverMinQpsNum'),
  status?: string(name='Status'),
  updateStatus?: string(name='UpdateStatus'),
  vSwitchId?: string(name='VSwitchId'),
  vpcId?: string(name='VpcId'),
  zoneId?: string(name='ZoneId'),
}

model DescribeServerlessInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeServerlessInstanceResponseBody(name='body'),
}

/**
 * @param request DescribeServerlessInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeServerlessInstanceResponse
 */
async function describeServerlessInstanceWithOptions(request: DescribeServerlessInstanceRequest, runtime: Util.RuntimeOptions): DescribeServerlessInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeServerlessInstance',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeServerlessInstanceRequest
 * @return DescribeServerlessInstanceResponse
 */
async function describeServerlessInstance(request: DescribeServerlessInstanceRequest): DescribeServerlessInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeServerlessInstanceWithOptions(request, runtime);
}

model DescribeSubscriptionInitializeProgressRequest {
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  subscriptionId?: string(name='SubscriptionId', description='This parameter is required.'),
}

model DescribeSubscriptionInitializeProgressResponseBody = {
  items?: [ 
    {
      finishTime?: string(name='FinishTime'),
      progress?: string(name='Progress'),
      status?: string(name='Status'),
      subscriptionId?: string(name='SubscriptionId'),
    }
  ](name='Items'),
  pageNumber?: int32(name='PageNumber'),
  pageRecordCount?: int32(name='PageRecordCount'),
  requestId?: string(name='RequestId'),
  totalRecordCount?: int32(name='TotalRecordCount'),
}

model DescribeSubscriptionInitializeProgressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSubscriptionInitializeProgressResponseBody(name='body'),
}

/**
 * @summary 查询订阅进度
 *
 * @param request DescribeSubscriptionInitializeProgressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSubscriptionInitializeProgressResponse
 */
async function describeSubscriptionInitializeProgressWithOptions(request: DescribeSubscriptionInitializeProgressRequest, runtime: Util.RuntimeOptions): DescribeSubscriptionInitializeProgressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.subscriptionId)) {
    query['SubscriptionId'] = request.subscriptionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSubscriptionInitializeProgress',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询订阅进度
 *
 * @param request DescribeSubscriptionInitializeProgressRequest
 * @return DescribeSubscriptionInitializeProgressResponse
 */
async function describeSubscriptionInitializeProgress(request: DescribeSubscriptionInitializeProgressRequest): DescribeSubscriptionInitializeProgressResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSubscriptionInitializeProgressWithOptions(request, runtime);
}

model DescribeSubscriptionPerformanceRequest {
  endTime?: string(name='EndTime', description='This parameter is required.'),
  key?: string(name='Key', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  sourceInstanceId?: string(name='SourceInstanceId', description='This parameter is required.'),
  startTime?: string(name='StartTime', description='This parameter is required.'),
  subscriptionId?: string(name='SubscriptionId', description='This parameter is required.'),
}

model DescribeSubscriptionPerformanceResponseBody = {
  endTime?: string(name='EndTime'),
  performanceKeys?: {
    performanceKey?: [ 
      {
        key?: string(name='Key'),
        performanceValues?: {
          performanceValue?: [ 
            {
              date?: string(name='Date'),
              value?: string(name='Value'),
            }
          ](name='PerformanceValue'),
        }(name='PerformanceValues'),
        unit?: string(name='Unit'),
        valueFormat?: string(name='ValueFormat'),
      }
    ](name='PerformanceKey'),
  }(name='PerformanceKeys'),
  replicaId?: string(name='ReplicaId'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeSubscriptionPerformanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSubscriptionPerformanceResponseBody(name='body'),
}

/**
 * @summary 查询订阅
 *
 * @param request DescribeSubscriptionPerformanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSubscriptionPerformanceResponse
 */
async function describeSubscriptionPerformanceWithOptions(request: DescribeSubscriptionPerformanceRequest, runtime: Util.RuntimeOptions): DescribeSubscriptionPerformanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.sourceInstanceId)) {
    query['SourceInstanceId'] = request.sourceInstanceId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.subscriptionId)) {
    query['SubscriptionId'] = request.subscriptionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSubscriptionPerformance',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询订阅
 *
 * @param request DescribeSubscriptionPerformanceRequest
 * @return DescribeSubscriptionPerformanceResponse
 */
async function describeSubscriptionPerformance(request: DescribeSubscriptionPerformanceRequest): DescribeSubscriptionPerformanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSubscriptionPerformanceWithOptions(request, runtime);
}

model DescribeSubscriptionPermissionRequest {
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model DescribeSubscriptionPermissionResponseBody = {
  requestId?: string(name='RequestId'),
  status?: string(name='Status'),
}

model DescribeSubscriptionPermissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSubscriptionPermissionResponseBody(name='body'),
}

/**
 * @summary 查询订阅权限
 *
 * @param request DescribeSubscriptionPermissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSubscriptionPermissionResponse
 */
async function describeSubscriptionPermissionWithOptions(request: DescribeSubscriptionPermissionRequest, runtime: Util.RuntimeOptions): DescribeSubscriptionPermissionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSubscriptionPermission',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询订阅权限
 *
 * @param request DescribeSubscriptionPermissionRequest
 * @return DescribeSubscriptionPermissionResponse
 */
async function describeSubscriptionPermission(request: DescribeSubscriptionPermissionRequest): DescribeSubscriptionPermissionResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSubscriptionPermissionWithOptions(request, runtime);
}

model DescribeSubscriptionsRequest {
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  subscriptionId?: string(name='SubscriptionId'),
}

model DescribeSubscriptionsResponseBody = {
  requestId?: string(name='RequestId'),
  subscriptions?: [ 
    {
      DBInstances?: [ 
        {
          DBInstanceId?: string(name='DBInstanceId'),
          regionId?: string(name='RegionId'),
          role?: string(name='Role'),
        }
      ](name='DBInstances'),
      mapping?: string(name='Mapping'),
      subscriptionDescription?: string(name='SubscriptionDescription'),
      subscriptionId?: string(name='SubscriptionId'),
      subscriptionStatus?: string(name='SubscriptionStatus'),
      subscriptionType?: string(name='SubscriptionType'),
    }
  ](name='Subscriptions'),
}

model DescribeSubscriptionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSubscriptionsResponseBody(name='body'),
}

/**
 * @summary 查询订阅列表
 *
 * @param request DescribeSubscriptionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSubscriptionsResponse
 */
async function describeSubscriptionsWithOptions(request: DescribeSubscriptionsRequest, runtime: Util.RuntimeOptions): DescribeSubscriptionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.subscriptionId)) {
    query['SubscriptionId'] = request.subscriptionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSubscriptions',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询订阅列表
 *
 * @param request DescribeSubscriptionsRequest
 * @return DescribeSubscriptionsResponse
 */
async function describeSubscriptions(request: DescribeSubscriptionsRequest): DescribeSubscriptionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSubscriptionsWithOptions(request, runtime);
}

model EnableServerlessPublicConnectionRequest {
  clientToken?: string(name='ClientToken'),
  instanceId?: string(name='InstanceId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId', description='This parameter is required.'),
}

model EnableServerlessPublicConnectionResponseBody = {
  requestId?: string(name='RequestId'),
}

model EnableServerlessPublicConnectionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: EnableServerlessPublicConnectionResponseBody(name='body'),
}

/**
 * @param request EnableServerlessPublicConnectionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return EnableServerlessPublicConnectionResponse
 */
async function enableServerlessPublicConnectionWithOptions(request: EnableServerlessPublicConnectionRequest, runtime: Util.RuntimeOptions): EnableServerlessPublicConnectionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EnableServerlessPublicConnection',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request EnableServerlessPublicConnectionRequest
 * @return EnableServerlessPublicConnectionResponse
 */
async function enableServerlessPublicConnection(request: EnableServerlessPublicConnectionRequest): EnableServerlessPublicConnectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return enableServerlessPublicConnectionWithOptions(request, runtime);
}

model GetMultimodeCmsUrlRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model GetMultimodeCmsUrlResponseBody = {
  clusterId?: string(name='ClusterId'),
  multimodCmsUrl?: string(name='MultimodCmsUrl'),
  requestId?: string(name='RequestId'),
}

model GetMultimodeCmsUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetMultimodeCmsUrlResponseBody(name='body'),
}

/**
 * @param request GetMultimodeCmsUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetMultimodeCmsUrlResponse
 */
async function getMultimodeCmsUrlWithOptions(request: GetMultimodeCmsUrlRequest, runtime: Util.RuntimeOptions): GetMultimodeCmsUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetMultimodeCmsUrl',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request GetMultimodeCmsUrlRequest
 * @return GetMultimodeCmsUrlResponse
 */
async function getMultimodeCmsUrl(request: GetMultimodeCmsUrlRequest): GetMultimodeCmsUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMultimodeCmsUrlWithOptions(request, runtime);
}

model ListClusterServiceConfigRequest {
  clusterId?: string(name='ClusterId'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ListClusterServiceConfigResponseBody = {
  clusterId?: string(name='ClusterId'),
  clusterName?: string(name='ClusterName'),
  configList?: {
    config?: [ 
    {
      defaultValue?: string(name='DefaultValue'),
      description?: string(name='Description'),
      name?: string(name='Name'),
      needRestart?: string(name='NeedRestart'),
      runningValue?: string(name='RunningValue'),
      unit?: string(name='Unit'),
      valueRange?: string(name='ValueRange'),
    }
  ](name='Config')
  }(name='ConfigList'),
  pageNumber?: int32(name='PageNumber'),
  pageRecordCount?: int32(name='PageRecordCount'),
  requestId?: string(name='RequestId'),
  totalRecordCount?: int32(name='TotalRecordCount'),
}

model ListClusterServiceConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListClusterServiceConfigResponseBody(name='body'),
}

/**
 * @param request ListClusterServiceConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListClusterServiceConfigResponse
 */
async function listClusterServiceConfigWithOptions(request: ListClusterServiceConfigRequest, runtime: Util.RuntimeOptions): ListClusterServiceConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterServiceConfig',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ListClusterServiceConfigRequest
 * @return ListClusterServiceConfigResponse
 */
async function listClusterServiceConfig(request: ListClusterServiceConfigRequest): ListClusterServiceConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterServiceConfigWithOptions(request, runtime);
}

model ListClusterServiceConfigHistoryRequest {
  clusterId?: string(name='ClusterId'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model ListClusterServiceConfigHistoryResponseBody = {
  configHistoryList?: {
    configHistory?: [ 
    {
      createTime?: string(name='CreateTime'),
      effective?: string(name='Effective'),
      name?: string(name='Name'),
      newValue?: string(name='NewValue'),
      oldValue?: string(name='OldValue'),
    }
  ](name='ConfigHistory')
  }(name='ConfigHistoryList'),
  pageNumber?: int32(name='PageNumber'),
  pageRecordCount?: int32(name='PageRecordCount'),
  requestId?: string(name='RequestId'),
  totalRecordCount?: int32(name='TotalRecordCount'),
}

model ListClusterServiceConfigHistoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListClusterServiceConfigHistoryResponseBody(name='body'),
}

/**
 * @param request ListClusterServiceConfigHistoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListClusterServiceConfigHistoryResponse
 */
async function listClusterServiceConfigHistoryWithOptions(request: ListClusterServiceConfigHistoryRequest, runtime: Util.RuntimeOptions): ListClusterServiceConfigHistoryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListClusterServiceConfigHistory',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ListClusterServiceConfigHistoryRequest
 * @return ListClusterServiceConfigHistoryResponse
 */
async function listClusterServiceConfigHistory(request: ListClusterServiceConfigHistoryRequest): ListClusterServiceConfigHistoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClusterServiceConfigHistoryWithOptions(request, runtime);
}

model ListHbaseInstancesRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  vpcId?: string(name='VpcId'),
  zoneId?: string(name='ZoneId'),
}

model ListHbaseInstancesResponseBody = {
  instances?: {
    instance?: [ 
    {
      instanceId?: string(name='InstanceId'),
      instanceName?: string(name='InstanceName'),
      isDefault?: boolean(name='IsDefault'),
    }
  ](name='Instance')
  }(name='Instances'),
  requestId?: string(name='RequestId'),
}

model ListHbaseInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListHbaseInstancesResponseBody(name='body'),
}

/**
 * @summary 查询hbase实例列表
 *
 * @param request ListHbaseInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListHbaseInstancesResponse
 */
async function listHbaseInstancesWithOptions(request: ListHbaseInstancesRequest, runtime: Util.RuntimeOptions): ListHbaseInstancesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListHbaseInstances',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询hbase实例列表
 *
 * @param request ListHbaseInstancesRequest
 * @return ListHbaseInstancesResponse
 */
async function listHbaseInstances(request: ListHbaseInstancesRequest): ListHbaseInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listHbaseInstancesWithOptions(request, runtime);
}

model ListTagResourcesRequest {
  nextToken?: string(name='NextToken'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceId?: [ string ](name='ResourceId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType', description='This parameter is required.'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
}

model ListTagResourcesResponseBody = {
  nextToken?: string(name='NextToken'),
  requestId?: string(name='RequestId'),
  tagResources?: {
    tagResource?: [ 
    {
      resourceId?: string(name='ResourceId'),
      resourceType?: string(name='ResourceType'),
      tagKey?: string(name='TagKey'),
      tagValue?: string(name='TagValue'),
    }
  ](name='TagResource')
  }(name='TagResources'),
}

model ListTagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTagResourcesResponseBody(name='body'),
}

/**
 * @param request ListTagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTagResourcesResponse
 */
async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTagResources',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ListTagResourcesRequest
 * @return ListTagResourcesResponse
 */
async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagResourcesWithOptions(request, runtime);
}

model ModifyBackupPolicyRequest {
  clientToken?: string(name='ClientToken'),
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  preferredBackupEndTimeUTC?: string(name='PreferredBackupEndTimeUTC'),
  preferredBackupPeriod?: string(name='PreferredBackupPeriod', description='This parameter is required.'),
  preferredBackupStartTimeUTC?: string(name='PreferredBackupStartTimeUTC'),
  preferredBackupTime?: string(name='PreferredBackupTime', description='This parameter is required.'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model ModifyBackupPolicyResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyBackupPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyBackupPolicyResponseBody(name='body'),
}

/**
 * @param request ModifyBackupPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyBackupPolicyResponse
 */
async function modifyBackupPolicyWithOptions(request: ModifyBackupPolicyRequest, runtime: Util.RuntimeOptions): ModifyBackupPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.preferredBackupEndTimeUTC)) {
    query['PreferredBackupEndTimeUTC'] = request.preferredBackupEndTimeUTC;
  }
  if (!Util.isUnset(request.preferredBackupPeriod)) {
    query['PreferredBackupPeriod'] = request.preferredBackupPeriod;
  }
  if (!Util.isUnset(request.preferredBackupStartTimeUTC)) {
    query['PreferredBackupStartTimeUTC'] = request.preferredBackupStartTimeUTC;
  }
  if (!Util.isUnset(request.preferredBackupTime)) {
    query['PreferredBackupTime'] = request.preferredBackupTime;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyBackupPolicy',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyBackupPolicyRequest
 * @return ModifyBackupPolicyResponse
 */
async function modifyBackupPolicy(request: ModifyBackupPolicyRequest): ModifyBackupPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyBackupPolicyWithOptions(request, runtime);
}

model ModifyClusterNameRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  clusterName?: string(name='ClusterName', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model ModifyClusterNameResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyClusterNameResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyClusterNameResponseBody(name='body'),
}

/**
 * @param request ModifyClusterNameRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyClusterNameResponse
 */
async function modifyClusterNameWithOptions(request: ModifyClusterNameRequest, runtime: Util.RuntimeOptions): ModifyClusterNameResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.clusterName)) {
    query['ClusterName'] = request.clusterName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterName',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyClusterNameRequest
 * @return ModifyClusterNameResponse
 */
async function modifyClusterName(request: ModifyClusterNameRequest): ModifyClusterNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterNameWithOptions(request, runtime);
}

model ModifyClusterNetTypeRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  netType?: string(name='NetType', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  vSwitchId?: string(name='VSwitchId'),
  vpcId?: string(name='VpcId'),
  zoneId?: string(name='ZoneId'),
}

model ModifyClusterNetTypeResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyClusterNetTypeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyClusterNetTypeResponseBody(name='body'),
}

/**
 * @param request ModifyClusterNetTypeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyClusterNetTypeResponse
 */
async function modifyClusterNetTypeWithOptions(request: ModifyClusterNetTypeRequest, runtime: Util.RuntimeOptions): ModifyClusterNetTypeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.netType)) {
    query['NetType'] = request.netType;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.vSwitchId)) {
    query['VSwitchId'] = request.vSwitchId;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterNetType',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyClusterNetTypeRequest
 * @return ModifyClusterNetTypeResponse
 */
async function modifyClusterNetType(request: ModifyClusterNetTypeRequest): ModifyClusterNetTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterNetTypeWithOptions(request, runtime);
}

model ModifyClusterSecurityIpListRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityIpList?: string(name='SecurityIpList', description='This parameter is required.'),
  zoneId?: string(name='ZoneId'),
}

model ModifyClusterSecurityIpListResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyClusterSecurityIpListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyClusterSecurityIpListResponseBody(name='body'),
}

/**
 * @param request ModifyClusterSecurityIpListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyClusterSecurityIpListResponse
 */
async function modifyClusterSecurityIpListWithOptions(request: ModifyClusterSecurityIpListRequest, runtime: Util.RuntimeOptions): ModifyClusterSecurityIpListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityIpList)) {
    query['SecurityIpList'] = request.securityIpList;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterSecurityIpList',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyClusterSecurityIpListRequest
 * @return ModifyClusterSecurityIpListResponse
 */
async function modifyClusterSecurityIpList(request: ModifyClusterSecurityIpListRequest): ModifyClusterSecurityIpListResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterSecurityIpListWithOptions(request, runtime);
}

model ModifyClusterServiceConfigRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  name?: string(name='Name'),
  ownerId?: long(name='OwnerId'),
  parameters?: string(name='Parameters'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  restart?: boolean(name='Restart'),
  value?: string(name='Value'),
  zoneId?: string(name='ZoneId'),
}

model ModifyClusterServiceConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyClusterServiceConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyClusterServiceConfigResponseBody(name='body'),
}

/**
 * @param request ModifyClusterServiceConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyClusterServiceConfigResponse
 */
async function modifyClusterServiceConfigWithOptions(request: ModifyClusterServiceConfigRequest, runtime: Util.RuntimeOptions): ModifyClusterServiceConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.parameters)) {
    query['Parameters'] = request.parameters;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.restart)) {
    query['Restart'] = request.restart;
  }
  if (!Util.isUnset(request.value)) {
    query['Value'] = request.value;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterServiceConfig',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyClusterServiceConfigRequest
 * @return ModifyClusterServiceConfigResponse
 */
async function modifyClusterServiceConfig(request: ModifyClusterServiceConfigRequest): ModifyClusterServiceConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterServiceConfigWithOptions(request, runtime);
}

model ModifyHasRootPasswordRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  hasPassword?: string(name='HasPassword', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model ModifyHasRootPasswordResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyHasRootPasswordResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyHasRootPasswordResponseBody(name='body'),
}

/**
 * @param request ModifyHasRootPasswordRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyHasRootPasswordResponse
 */
async function modifyHasRootPasswordWithOptions(request: ModifyHasRootPasswordRequest, runtime: Util.RuntimeOptions): ModifyHasRootPasswordResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.hasPassword)) {
    query['HasPassword'] = request.hasPassword;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyHasRootPassword',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyHasRootPasswordRequest
 * @return ModifyHasRootPasswordResponse
 */
async function modifyHasRootPassword(request: ModifyHasRootPasswordRequest): ModifyHasRootPasswordResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyHasRootPasswordWithOptions(request, runtime);
}

model ModifyRestartClusterRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  components?: string(name='Components'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model ModifyRestartClusterResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyRestartClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyRestartClusterResponseBody(name='body'),
}

/**
 * @param request ModifyRestartClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyRestartClusterResponse
 */
async function modifyRestartClusterWithOptions(request: ModifyRestartClusterRequest, runtime: Util.RuntimeOptions): ModifyRestartClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.components)) {
    query['Components'] = request.components;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyRestartCluster',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyRestartClusterRequest
 * @return ModifyRestartClusterResponse
 */
async function modifyRestartCluster(request: ModifyRestartClusterRequest): ModifyRestartClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyRestartClusterWithOptions(request, runtime);
}

model ModifyRollbackHasForHbaseRequest {
  clientToken?: string(name='ClientToken'),
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model ModifyRollbackHasForHbaseResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyRollbackHasForHbaseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyRollbackHasForHbaseResponseBody(name='body'),
}

/**
 * @param request ModifyRollbackHasForHbaseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyRollbackHasForHbaseResponse
 */
async function modifyRollbackHasForHbaseWithOptions(request: ModifyRollbackHasForHbaseRequest, runtime: Util.RuntimeOptions): ModifyRollbackHasForHbaseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyRollbackHasForHbase',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyRollbackHasForHbaseRequest
 * @return ModifyRollbackHasForHbaseResponse
 */
async function modifyRollbackHasForHbase(request: ModifyRollbackHasForHbaseRequest): ModifyRollbackHasForHbaseResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyRollbackHasForHbaseWithOptions(request, runtime);
}

model ModifySubscriptionDescriptionRequest {
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  subscriptionDescription?: string(name='SubscriptionDescription', description='This parameter is required.'),
  subscriptionId?: string(name='SubscriptionId', description='This parameter is required.'),
}

model ModifySubscriptionDescriptionResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifySubscriptionDescriptionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifySubscriptionDescriptionResponseBody(name='body'),
}

/**
 * @summary 更新订阅描述
 *
 * @param request ModifySubscriptionDescriptionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifySubscriptionDescriptionResponse
 */
async function modifySubscriptionDescriptionWithOptions(request: ModifySubscriptionDescriptionRequest, runtime: Util.RuntimeOptions): ModifySubscriptionDescriptionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.subscriptionDescription)) {
    query['SubscriptionDescription'] = request.subscriptionDescription;
  }
  if (!Util.isUnset(request.subscriptionId)) {
    query['SubscriptionId'] = request.subscriptionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifySubscriptionDescription',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 更新订阅描述
 *
 * @param request ModifySubscriptionDescriptionRequest
 * @return ModifySubscriptionDescriptionResponse
 */
async function modifySubscriptionDescription(request: ModifySubscriptionDescriptionRequest): ModifySubscriptionDescriptionResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifySubscriptionDescriptionWithOptions(request, runtime);
}

model ModifySubscriptionMappingRequest {
  mapping?: string(name='Mapping', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  subscriptionId?: string(name='SubscriptionId', description='This parameter is required.'),
}

model ModifySubscriptionMappingResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifySubscriptionMappingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifySubscriptionMappingResponseBody(name='body'),
}

/**
 * @summary 更新订阅
 *
 * @param request ModifySubscriptionMappingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifySubscriptionMappingResponse
 */
async function modifySubscriptionMappingWithOptions(request: ModifySubscriptionMappingRequest, runtime: Util.RuntimeOptions): ModifySubscriptionMappingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.mapping)) {
    query['Mapping'] = request.mapping;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.subscriptionId)) {
    query['SubscriptionId'] = request.subscriptionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifySubscriptionMapping',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 更新订阅
 *
 * @param request ModifySubscriptionMappingRequest
 * @return ModifySubscriptionMappingResponse
 */
async function modifySubscriptionMapping(request: ModifySubscriptionMappingRequest): ModifySubscriptionMappingResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifySubscriptionMappingWithOptions(request, runtime);
}

model ModifySubscriptionPermissionRequest {
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  status?: int32(name='Status', description='This parameter is required.'),
}

model ModifySubscriptionPermissionResponseBody = {
  requestId?: string(name='RequestId'),
  status?: string(name='Status'),
}

model ModifySubscriptionPermissionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifySubscriptionPermissionResponseBody(name='body'),
}

/**
 * @summary 更新订阅权限
 *
 * @param request ModifySubscriptionPermissionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifySubscriptionPermissionResponse
 */
async function modifySubscriptionPermissionWithOptions(request: ModifySubscriptionPermissionRequest, runtime: Util.RuntimeOptions): ModifySubscriptionPermissionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifySubscriptionPermission',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 更新订阅权限
 *
 * @param request ModifySubscriptionPermissionRequest
 * @return ModifySubscriptionPermissionResponse
 */
async function modifySubscriptionPermission(request: ModifySubscriptionPermissionRequest): ModifySubscriptionPermissionResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifySubscriptionPermissionWithOptions(request, runtime);
}

model ModifyUIProxyAccountPasswordRequest {
  accountName?: string(name='AccountName', description='This parameter is required.'),
  accountPassword?: string(name='AccountPassword', description='This parameter is required.'),
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model ModifyUIProxyAccountPasswordResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyUIProxyAccountPasswordResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyUIProxyAccountPasswordResponseBody(name='body'),
}

/**
 * @param request ModifyUIProxyAccountPasswordRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyUIProxyAccountPasswordResponse
 */
async function modifyUIProxyAccountPasswordWithOptions(request: ModifyUIProxyAccountPasswordRequest, runtime: Util.RuntimeOptions): ModifyUIProxyAccountPasswordResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountName)) {
    query['AccountName'] = request.accountName;
  }
  if (!Util.isUnset(request.accountPassword)) {
    query['AccountPassword'] = request.accountPassword;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyUIProxyAccountPassword',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyUIProxyAccountPasswordRequest
 * @return ModifyUIProxyAccountPasswordResponse
 */
async function modifyUIProxyAccountPassword(request: ModifyUIProxyAccountPasswordRequest): ModifyUIProxyAccountPasswordResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyUIProxyAccountPasswordWithOptions(request, runtime);
}

model ModifyUpgradeToHasForHbaseRequest {
  clientToken?: string(name='ClientToken'),
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  hasPassword?: string(name='HasPassword', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model ModifyUpgradeToHasForHbaseResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyUpgradeToHasForHbaseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyUpgradeToHasForHbaseResponseBody(name='body'),
}

/**
 * @param request ModifyUpgradeToHasForHbaseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyUpgradeToHasForHbaseResponse
 */
async function modifyUpgradeToHasForHbaseWithOptions(request: ModifyUpgradeToHasForHbaseRequest, runtime: Util.RuntimeOptions): ModifyUpgradeToHasForHbaseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.hasPassword)) {
    query['HasPassword'] = request.hasPassword;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyUpgradeToHasForHbase',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyUpgradeToHasForHbaseRequest
 * @return ModifyUpgradeToHasForHbaseResponse
 */
async function modifyUpgradeToHasForHbase(request: ModifyUpgradeToHasForHbaseRequest): ModifyUpgradeToHasForHbaseResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyUpgradeToHasForHbaseWithOptions(request, runtime);
}

model MultimodAddComponentsRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  components?: string(name='Components', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model MultimodAddComponentsResponseBody = {
  requestId?: string(name='RequestId'),
}

model MultimodAddComponentsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: MultimodAddComponentsResponseBody(name='body'),
}

/**
 * @param request MultimodAddComponentsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return MultimodAddComponentsResponse
 */
async function multimodAddComponentsWithOptions(request: MultimodAddComponentsRequest, runtime: Util.RuntimeOptions): MultimodAddComponentsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.components)) {
    query['Components'] = request.components;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'MultimodAddComponents',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request MultimodAddComponentsRequest
 * @return MultimodAddComponentsResponse
 */
async function multimodAddComponents(request: MultimodAddComponentsRequest): MultimodAddComponentsResponse {
  var runtime = new Util.RuntimeOptions{};
  return multimodAddComponentsWithOptions(request, runtime);
}

model OpenBackupRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  regionId?: string(name='RegionId'),
  zoneId?: string(name='ZoneId'),
}

model OpenBackupResponseBody = {
  requestId?: string(name='RequestId'),
}

model OpenBackupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: OpenBackupResponseBody(name='body'),
}

/**
 * @param request OpenBackupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return OpenBackupResponse
 */
async function openBackupWithOptions(request: OpenBackupRequest, runtime: Util.RuntimeOptions): OpenBackupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'OpenBackup',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request OpenBackupRequest
 * @return OpenBackupResponse
 */
async function openBackup(request: OpenBackupRequest): OpenBackupResponse {
  var runtime = new Util.RuntimeOptions{};
  return openBackupWithOptions(request, runtime);
}

model QueryHBaseHaDBRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model QueryHBaseHaDBResponseBody = {
  clusterList?: {
    cluster?: [ 
    {
      activeName?: string(name='ActiveName'),
      bdsName?: string(name='BdsName'),
      haName?: string(name='HaName'),
      standbyName?: string(name='StandbyName'),
    }
  ](name='Cluster')
  }(name='ClusterList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model QueryHBaseHaDBResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryHBaseHaDBResponseBody(name='body'),
}

/**
 * @param request QueryHBaseHaDBRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryHBaseHaDBResponse
 */
async function queryHBaseHaDBWithOptions(request: QueryHBaseHaDBRequest, runtime: Util.RuntimeOptions): QueryHBaseHaDBResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryHBaseHaDB',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request QueryHBaseHaDBRequest
 * @return QueryHBaseHaDBResponse
 */
async function queryHBaseHaDB(request: QueryHBaseHaDBRequest): QueryHBaseHaDBResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryHBaseHaDBWithOptions(request, runtime);
}

model QuerySparkRelateHBaseRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model QuerySparkRelateHBaseResponseBody = {
  clusterList?: {
    cluster?: [ 
    {
      clusterId?: string(name='ClusterId'),
      clusterName?: string(name='ClusterName'),
      clusterType?: string(name='ClusterType'),
      coreDiskType?: string(name='CoreDiskType'),
      coreInstanceQuantity?: int32(name='CoreInstanceQuantity'),
      createTime?: string(name='CreateTime'),
      dbType?: string(name='DbType'),
      expireTime?: string(name='ExpireTime'),
      isRelated?: boolean(name='IsRelated'),
      lockMode?: string(name='LockMode'),
      mainVersion?: string(name='MainVersion'),
      netType?: string(name='NetType'),
      payType?: string(name='PayType'),
      reason?: string(name='Reason'),
      regionId?: string(name='RegionId'),
      status?: string(name='Status'),
      userId?: string(name='UserId'),
      zoneId?: string(name='ZoneId'),
    }
  ](name='Cluster')
  }(name='ClusterList'),
  requestId?: string(name='RequestId'),
}

model QuerySparkRelateHBaseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QuerySparkRelateHBaseResponseBody(name='body'),
}

/**
 * @param request QuerySparkRelateHBaseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QuerySparkRelateHBaseResponse
 */
async function querySparkRelateHBaseWithOptions(request: QuerySparkRelateHBaseRequest, runtime: Util.RuntimeOptions): QuerySparkRelateHBaseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QuerySparkRelateHBase',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request QuerySparkRelateHBaseRequest
 * @return QuerySparkRelateHBaseResponse
 */
async function querySparkRelateHBase(request: QuerySparkRelateHBaseRequest): QuerySparkRelateHBaseResponse {
  var runtime = new Util.RuntimeOptions{};
  return querySparkRelateHBaseWithOptions(request, runtime);
}

model QueryXpackRelatedDBRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  relateDbType?: string(name='RelateDbType', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model QueryXpackRelatedDBResponseBody = {
  clusterList?: {
    cluster?: [ 
    {
      clusterId?: string(name='ClusterId'),
      clusterName?: string(name='ClusterName'),
      DBType?: string(name='DBType'),
      DBVersion?: string(name='DBVersion'),
      isRelated?: boolean(name='IsRelated'),
      status?: string(name='Status'),
    }
  ](name='Cluster')
  }(name='ClusterList'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model QueryXpackRelatedDBResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryXpackRelatedDBResponseBody(name='body'),
}

/**
 * @param request QueryXpackRelatedDBRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryXpackRelatedDBResponse
 */
async function queryXpackRelatedDBWithOptions(request: QueryXpackRelatedDBRequest, runtime: Util.RuntimeOptions): QueryXpackRelatedDBResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.relateDbType)) {
    query['RelateDbType'] = request.relateDbType;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryXpackRelatedDB',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request QueryXpackRelatedDBRequest
 * @return QueryXpackRelatedDBResponse
 */
async function queryXpackRelatedDB(request: QueryXpackRelatedDBRequest): QueryXpackRelatedDBResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryXpackRelatedDBWithOptions(request, runtime);
}

model RelateDbForHBaseHaRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  haActive?: string(name='HaActive', description='This parameter is required.'),
  haActiveClusterKey?: string(name='HaActiveClusterKey'),
  haActiveDBType?: string(name='HaActiveDBType', description='This parameter is required.'),
  haActiveHbaseFsDir?: string(name='HaActiveHbaseFsDir'),
  haActiveHdfsUri?: string(name='HaActiveHdfsUri'),
  haActivePassword?: string(name='HaActivePassword'),
  haActiveUser?: string(name='HaActiveUser'),
  haActiveVersion?: string(name='HaActiveVersion'),
  haMigrateType?: string(name='HaMigrateType', description='This parameter is required.'),
  haStandby?: string(name='HaStandby', description='This parameter is required.'),
  haStandbyClusterKey?: string(name='HaStandbyClusterKey'),
  haStandbyDBType?: string(name='HaStandbyDBType', description='This parameter is required.'),
  haStandbyHbaseFsDir?: string(name='HaStandbyHbaseFsDir'),
  haStandbyHdfsUri?: string(name='HaStandbyHdfsUri'),
  haStandbyPassword?: string(name='HaStandbyPassword'),
  haStandbyUser?: string(name='HaStandbyUser'),
  haStandbyVersion?: string(name='HaStandbyVersion'),
  haTables?: string(name='HaTables'),
  isActiveStandard?: boolean(name='IsActiveStandard', description='This parameter is required.'),
  isStandbyStandard?: boolean(name='IsStandbyStandard', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model RelateDbForHBaseHaResponseBody = {
  requestId?: string(name='RequestId'),
}

model RelateDbForHBaseHaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RelateDbForHBaseHaResponseBody(name='body'),
}

/**
 * @param request RelateDbForHBaseHaRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RelateDbForHBaseHaResponse
 */
async function relateDbForHBaseHaWithOptions(request: RelateDbForHBaseHaRequest, runtime: Util.RuntimeOptions): RelateDbForHBaseHaResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.haActive)) {
    query['HaActive'] = request.haActive;
  }
  if (!Util.isUnset(request.haActiveClusterKey)) {
    query['HaActiveClusterKey'] = request.haActiveClusterKey;
  }
  if (!Util.isUnset(request.haActiveDBType)) {
    query['HaActiveDBType'] = request.haActiveDBType;
  }
  if (!Util.isUnset(request.haActiveHbaseFsDir)) {
    query['HaActiveHbaseFsDir'] = request.haActiveHbaseFsDir;
  }
  if (!Util.isUnset(request.haActiveHdfsUri)) {
    query['HaActiveHdfsUri'] = request.haActiveHdfsUri;
  }
  if (!Util.isUnset(request.haActivePassword)) {
    query['HaActivePassword'] = request.haActivePassword;
  }
  if (!Util.isUnset(request.haActiveUser)) {
    query['HaActiveUser'] = request.haActiveUser;
  }
  if (!Util.isUnset(request.haActiveVersion)) {
    query['HaActiveVersion'] = request.haActiveVersion;
  }
  if (!Util.isUnset(request.haMigrateType)) {
    query['HaMigrateType'] = request.haMigrateType;
  }
  if (!Util.isUnset(request.haStandby)) {
    query['HaStandby'] = request.haStandby;
  }
  if (!Util.isUnset(request.haStandbyClusterKey)) {
    query['HaStandbyClusterKey'] = request.haStandbyClusterKey;
  }
  if (!Util.isUnset(request.haStandbyDBType)) {
    query['HaStandbyDBType'] = request.haStandbyDBType;
  }
  if (!Util.isUnset(request.haStandbyHbaseFsDir)) {
    query['HaStandbyHbaseFsDir'] = request.haStandbyHbaseFsDir;
  }
  if (!Util.isUnset(request.haStandbyHdfsUri)) {
    query['HaStandbyHdfsUri'] = request.haStandbyHdfsUri;
  }
  if (!Util.isUnset(request.haStandbyPassword)) {
    query['HaStandbyPassword'] = request.haStandbyPassword;
  }
  if (!Util.isUnset(request.haStandbyUser)) {
    query['HaStandbyUser'] = request.haStandbyUser;
  }
  if (!Util.isUnset(request.haStandbyVersion)) {
    query['HaStandbyVersion'] = request.haStandbyVersion;
  }
  if (!Util.isUnset(request.haTables)) {
    query['HaTables'] = request.haTables;
  }
  if (!Util.isUnset(request.isActiveStandard)) {
    query['IsActiveStandard'] = request.isActiveStandard;
  }
  if (!Util.isUnset(request.isStandbyStandard)) {
    query['IsStandbyStandard'] = request.isStandbyStandard;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RelateDbForHBaseHa',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request RelateDbForHBaseHaRequest
 * @return RelateDbForHBaseHaResponse
 */
async function relateDbForHBaseHa(request: RelateDbForHBaseHaRequest): RelateDbForHBaseHaResponse {
  var runtime = new Util.RuntimeOptions{};
  return relateDbForHBaseHaWithOptions(request, runtime);
}

model ReleasePublicNetworkAddressRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model ReleasePublicNetworkAddressResponseBody = {
  requestId?: string(name='RequestId'),
}

model ReleasePublicNetworkAddressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReleasePublicNetworkAddressResponseBody(name='body'),
}

/**
 * @param request ReleasePublicNetworkAddressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReleasePublicNetworkAddressResponse
 */
async function releasePublicNetworkAddressWithOptions(request: ReleasePublicNetworkAddressRequest, runtime: Util.RuntimeOptions): ReleasePublicNetworkAddressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ReleasePublicNetworkAddress',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ReleasePublicNetworkAddressRequest
 * @return ReleasePublicNetworkAddressResponse
 */
async function releasePublicNetworkAddress(request: ReleasePublicNetworkAddressRequest): ReleasePublicNetworkAddressResponse {
  var runtime = new Util.RuntimeOptions{};
  return releasePublicNetworkAddressWithOptions(request, runtime);
}

model ReleaseSubscriptionRequest {
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  subscriptionId?: string(name='SubscriptionId', description='This parameter is required.'),
}

model ReleaseSubscriptionResponseBody = {
  requestId?: string(name='RequestId'),
}

model ReleaseSubscriptionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReleaseSubscriptionResponseBody(name='body'),
}

/**
 * @summary 是否订阅
 *
 * @param request ReleaseSubscriptionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReleaseSubscriptionResponse
 */
async function releaseSubscriptionWithOptions(request: ReleaseSubscriptionRequest, runtime: Util.RuntimeOptions): ReleaseSubscriptionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.subscriptionId)) {
    query['SubscriptionId'] = request.subscriptionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ReleaseSubscription',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 是否订阅
 *
 * @param request ReleaseSubscriptionRequest
 * @return ReleaseSubscriptionResponse
 */
async function releaseSubscription(request: ReleaseSubscriptionRequest): ReleaseSubscriptionResponse {
  var runtime = new Util.RuntimeOptions{};
  return releaseSubscriptionWithOptions(request, runtime);
}

model RenewClusterRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  duration?: int32(name='Duration', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  pricingCycle?: string(name='PricingCycle', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model RenewClusterResponseBody = {
  orderId?: long(name='OrderId'),
  requestId?: string(name='RequestId'),
}

model RenewClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RenewClusterResponseBody(name='body'),
}

/**
 * @param request RenewClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RenewClusterResponse
 */
async function renewClusterWithOptions(request: RenewClusterRequest, runtime: Util.RuntimeOptions): RenewClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.duration)) {
    query['Duration'] = request.duration;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pricingCycle)) {
    query['PricingCycle'] = request.pricingCycle;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RenewCluster',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request RenewClusterRequest
 * @return RenewClusterResponse
 */
async function renewCluster(request: RenewClusterRequest): RenewClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return renewClusterWithOptions(request, runtime);
}

model ResizeClusterRequest {
  clientToken?: string(name='ClientToken'),
  cloudType?: string(name='CloudType', description='This parameter is required.'),
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  coldStorageSize?: string(name='ColdStorageSize'),
  coreDiskQuantity?: string(name='CoreDiskQuantity'),
  coreDiskSize?: string(name='CoreDiskSize'),
  coreDiskType?: string(name='CoreDiskType'),
  coreInstanceQuantity?: string(name='CoreInstanceQuantity', description='This parameter is required.'),
  coreInstanceType?: string(name='CoreInstanceType'),
  engine?: string(name='Engine', description='This parameter is required.'),
  isColdStorage?: string(name='IsColdStorage'),
  payType?: string(name='PayType'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  upgradeType?: string(name='UpgradeType', description='This parameter is required.'),
  zoneId?: string(name='ZoneId', description='This parameter is required.'),
}

model ResizeClusterResponseBody = {
  requestId?: string(name='RequestId'),
}

model ResizeClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResizeClusterResponseBody(name='body'),
}

/**
 * @param request ResizeClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResizeClusterResponse
 */
async function resizeClusterWithOptions(request: ResizeClusterRequest, runtime: Util.RuntimeOptions): ResizeClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.cloudType)) {
    query['CloudType'] = request.cloudType;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.coldStorageSize)) {
    query['ColdStorageSize'] = request.coldStorageSize;
  }
  if (!Util.isUnset(request.coreDiskQuantity)) {
    query['CoreDiskQuantity'] = request.coreDiskQuantity;
  }
  if (!Util.isUnset(request.coreDiskSize)) {
    query['CoreDiskSize'] = request.coreDiskSize;
  }
  if (!Util.isUnset(request.coreDiskType)) {
    query['CoreDiskType'] = request.coreDiskType;
  }
  if (!Util.isUnset(request.coreInstanceQuantity)) {
    query['CoreInstanceQuantity'] = request.coreInstanceQuantity;
  }
  if (!Util.isUnset(request.coreInstanceType)) {
    query['CoreInstanceType'] = request.coreInstanceType;
  }
  if (!Util.isUnset(request.engine)) {
    query['Engine'] = request.engine;
  }
  if (!Util.isUnset(request.isColdStorage)) {
    query['IsColdStorage'] = request.isColdStorage;
  }
  if (!Util.isUnset(request.payType)) {
    query['PayType'] = request.payType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.upgradeType)) {
    query['UpgradeType'] = request.upgradeType;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ResizeCluster',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ResizeClusterRequest
 * @return ResizeClusterResponse
 */
async function resizeCluster(request: ResizeClusterRequest): ResizeClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return resizeClusterWithOptions(request, runtime);
}

model SparkRelateHBaseRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  HBaseClusterIds?: string(name='HBaseClusterIds', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model SparkRelateHBaseResponseBody = {
  requestId?: string(name='RequestId'),
}

model SparkRelateHBaseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SparkRelateHBaseResponseBody(name='body'),
}

/**
 * @param request SparkRelateHBaseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SparkRelateHBaseResponse
 */
async function sparkRelateHBaseWithOptions(request: SparkRelateHBaseRequest, runtime: Util.RuntimeOptions): SparkRelateHBaseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.HBaseClusterIds)) {
    query['HBaseClusterIds'] = request.HBaseClusterIds;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SparkRelateHBase',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request SparkRelateHBaseRequest
 * @return SparkRelateHBaseResponse
 */
async function sparkRelateHBase(request: SparkRelateHBaseRequest): SparkRelateHBaseResponse {
  var runtime = new Util.RuntimeOptions{};
  return sparkRelateHBaseWithOptions(request, runtime);
}

model TagResourcesRequest {
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceId?: [ string ](name='ResourceId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType', description='This parameter is required.'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag', description='This parameter is required.'),
}

model TagResourcesResponseBody = {
  requestId?: string(name='RequestId'),
}

model TagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TagResourcesResponseBody(name='body'),
}

/**
 * @param request TagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TagResourcesResponse
 */
async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TagResources',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request TagResourcesRequest
 * @return TagResourcesResponse
 */
async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return tagResourcesWithOptions(request, runtime);
}

model UntagResourcesRequest {
  all?: boolean(name='All'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourceId?: [ string ](name='ResourceId', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  resourceType?: string(name='ResourceType', description='This parameter is required.'),
  tagKey?: [ string ](name='TagKey'),
}

model UntagResourcesResponseBody = {
  requestId?: string(name='RequestId'),
}

model UntagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UntagResourcesResponseBody(name='body'),
}

/**
 * @param request UntagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UntagResourcesResponse
 */
async function untagResourcesWithOptions(request: UntagResourcesRequest, runtime: Util.RuntimeOptions): UntagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.all)) {
    query['All'] = request.all;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tagKey)) {
    query['TagKey'] = request.tagKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UntagResources',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UntagResourcesRequest
 * @return UntagResourcesResponse
 */
async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return untagResourcesWithOptions(request, runtime);
}

model UpgradeMinorVersionRequest {
  clientToken?: string(name='ClientToken'),
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  components?: string(name='Components'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  upgradeVersion?: string(name='UpgradeVersion'),
  zoneId?: string(name='ZoneId'),
}

model UpgradeMinorVersionResponseBody = {
  newVersion?: string(name='NewVersion'),
  oldVersion?: string(name='OldVersion'),
  requestId?: string(name='RequestId'),
}

model UpgradeMinorVersionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpgradeMinorVersionResponseBody(name='body'),
}

/**
 * @param request UpgradeMinorVersionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpgradeMinorVersionResponse
 */
async function upgradeMinorVersionWithOptions(request: UpgradeMinorVersionRequest, runtime: Util.RuntimeOptions): UpgradeMinorVersionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.components)) {
    query['Components'] = request.components;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.upgradeVersion)) {
    query['UpgradeVersion'] = request.upgradeVersion;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpgradeMinorVersion',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UpgradeMinorVersionRequest
 * @return UpgradeMinorVersionResponse
 */
async function upgradeMinorVersion(request: UpgradeMinorVersionRequest): UpgradeMinorVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return upgradeMinorVersionWithOptions(request, runtime);
}

model XpackRelateDBRequest {
  clusterId?: string(name='ClusterId', description='This parameter is required.'),
  dbClusterIds?: string(name='DbClusterIds', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  regionId?: string(name='RegionId'),
  relateDbType?: string(name='RelateDbType', description='This parameter is required.'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  zoneId?: string(name='ZoneId'),
}

model XpackRelateDBResponseBody = {
  requestId?: string(name='RequestId'),
}

model XpackRelateDBResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: XpackRelateDBResponseBody(name='body'),
}

/**
 * @param request XpackRelateDBRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return XpackRelateDBResponse
 */
async function xpackRelateDBWithOptions(request: XpackRelateDBRequest, runtime: Util.RuntimeOptions): XpackRelateDBResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dbClusterIds)) {
    query['DbClusterIds'] = request.dbClusterIds;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.relateDbType)) {
    query['RelateDbType'] = request.relateDbType;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'XpackRelateDB',
    version = '2017-01-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request XpackRelateDBRequest
 * @return XpackRelateDBResponse
 */
async function xpackRelateDB(request: XpackRelateDBRequest): XpackRelateDBResponse {
  var runtime = new Util.RuntimeOptions{};
  return xpackRelateDBWithOptions(request, runtime);
}

